﻿using Minecraft.Model;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Minecraft.ServerHall
{
	/// <summary>
	/// 场景
	/// </summary>
	public static class SceneExt
	{
		/// <summary>
		/// 切换场景统一方法（更换小地图时调用）
		/// </summary>
		/// <param name="session"></param>
		/// <param name="map"></param>
		public static void SwitchingScene(this MinecraftSession session, MapModel map)
		{
			//刷新宝箱
			session.ResetTreasurebox(true, map.SourceMapId);
			//清除上个地图掉落物品信息
			session.ClearMapDropGoodsInfo(map.LastMapId);
			//进入基地的处理（记录时间）
			session.IntoBase(map.SourceMapId);
		}
	}
}
